feat: high resolution and nested fractional enhancement#373
feat: high resolution and nested fractional enhancement#373leakonvalinka wants to merge 5 commits intoopen-feature:mainfrom
Conversation
Signed-off-by: Lea Konvalinka <lea.konvalinka@dynatrace.com>
Signed-off-by: Lea Konvalinka <lea.konvalinka@dynatrace.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a significant enhancement to the fractional evaluation mechanism within the flagd provider. It focuses on improving the precision and reliability of fractional flag assignments by modernizing the underlying hashing and bucketing algorithms. The changes aim to enhance the accuracy and robustness of fractional flag evaluations, resolving a previously identified issue. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors and improves the fractional evaluation logic to support high-resolution bucketing. The changes include extracting logic into a helper function, using unsigned 32-bit hashes for better distribution, and adopting a more precise integer-based calculation for bucketing. The test configurations are also updated to reflect these changes. My review identifies a minor opportunity for improving maintainability by replacing a magic number with a named constant.
...eature-provider-flagd/src/openfeature/contrib/provider/flagd/resolvers/process/custom_ops.py
Outdated
Show resolved
Hide resolved
Signed-off-by: lea konvalinka <lea.konvalinka@dynatrace.com>
Signed-off-by: Lea Konvalinka <lea.konvalinka@dynatrace.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #373 +/- ##
==========================================
- Coverage 95.57% 95.27% -0.30%
==========================================
Files 30 16 -14
Lines 1491 911 -580
==========================================
- Hits 1425 868 -557
+ Misses 66 43 -23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Lea Konvalinka <lea.konvalinka@dynatrace.com>
|
There's still 1 failing test, but I'm not sure how to fix it because I don't know what exactly it should be testing in the first place. It's the |
This PR
Related Issues
#360 and #359
Notes
Follow-up Tasks
Todo: remove
fractional-v2andfractional-nestedtags from RPC testsHow to test